From 73a4b1a5f19da18b5a6c1d8d4f6a77f1a09e80c8 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 10 Oct 2011 18:46:57 -0400 Subject: [PATCH] Rename from gbuild to hacktree --- Makefile-gbuild.am => Makefile-hacktree.am | 6 ++--- Makefile.am | 2 +- configure.ac | 2 ++ src/gbuild.in | 3 --- src/hacktree.in | 31 ++++++++++++++++++++++ 5 files changed, 37 insertions(+), 7 deletions(-) rename Makefile-gbuild.am => Makefile-hacktree.am (69%) delete mode 100644 src/gbuild.in create mode 100644 src/hacktree.in diff --git a/Makefile-gbuild.am b/Makefile-hacktree.am similarity index 69% rename from Makefile-gbuild.am rename to Makefile-hacktree.am index 13b09713..3215ff68 100644 --- a/Makefile-gbuild.am +++ b/Makefile-hacktree.am @@ -1,9 +1,9 @@ -bin_SCRIPTS += gbuild +bin_SCRIPTS += hacktree SUBSTITUTIONS = sed -e s,@libdir\@,$(libdir), -e s,@datarootdir\@,$(datarootdir), -e s,@PYTHON\@,$(PYTHON), -gbuild: src/gbuild.in Makefile +hacktree: src/hacktree.in Makefile $(AM_V_GEN) $(SUBSTITUTIONS) $< > $@.tmp && mv $@.tmp $@ @chmod a+x $@ -CLEANFILES += gbuild +CLEANFILES += hacktree diff --git a/Makefile.am b/Makefile.am index a08ca529..a2dc2690 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,4 +8,4 @@ noinst_LTLIBRARIES = noinst_PROGRAMS = -include Makefile-gbuild.am +include Makefile-hacktree.am diff --git a/configure.ac b/configure.ac index 02c69ed2..49b3fa63 100644 --- a/configure.ac +++ b/configure.ac @@ -19,6 +19,8 @@ PKG_PROG_PKG_CONFIG PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0]) +AM_PATH_PYTHON + AC_CONFIG_FILES([ Makefile ]) diff --git a/src/gbuild.in b/src/gbuild.in deleted file mode 100644 index 76ba8894..00000000 --- a/src/gbuild.in +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -echo test diff --git a/src/hacktree.in b/src/hacktree.in new file mode 100644 index 00000000..fd43d118 --- /dev/null +++ b/src/hacktree.in @@ -0,0 +1,31 @@ +#!@PYTHON@ +# -*- Mode: Python -*- +# Copyright (C) 2011 Colin Walters +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. +# + +import os +import sys +import re + +import __builtin__ + +__builtin__.__dict__['DATADIR'] = "@datarootdir@" + +path = os.path.join('@libdir@', 'hacktree') +sys.path.insert(0, path) + -- 2.30.2